package com.doitedu.mr.day04.itera;

import java.util.ArrayList;
import java.util.List;

/**
 * @Date 2021/12/3
 * @Created by HANGGE
 * @Description TODO
 */
public class TestMyIterator {
    public static void main(String[] args) {
        List<MyUser> ls = new ArrayList<>();
        MyIterator myIterator = new MyIterator();
        while (myIterator.hasNext()){
            MyUser myUser = myIterator.next();
            ls.add(myUser) ;
          // System.out.println(myUser);
        }
      for (int i = 0 ; i<3 ;i++){
          System.out.println(ls.get(i));
      }

    }
}
